package com.syh.jn.scm.infrastructure.repository.model.system;

import com.syh.core.ddd.infrastructure.repository.model.SuperModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table(name = "T_SYSTEM_MENU")
@EqualsAndHashCode(callSuper = true)
public class MenuModel extends SuperModel {
  /**
   * 上级菜单
   */
  @Column(name = "SUPER_ID", columnDefinition = "bigint COMMENT '上级菜单'")
  private Long superId;
  /**
   * 权限级别名称
   */
  @Column(name = "NAME", columnDefinition = "varchar(50) COMMENT '菜单名称'")
  private String name;
  /**
   * 类型 1、目录 2、菜单 3、按钮
   */
  @Column(name = "TYPE", columnDefinition = "smallint COMMENT '类型 1、目录 2、菜单 3、按钮'")
  private Short type;
  /**
   * 排序
   */
  @Column(name = "ORDER_LEVEL", columnDefinition = "smallint COMMENT '排序'")
  private Short orderLevel;
  /**
   * 类型 -1 停用 1 启用
   */
  @Column(name = "STATUS", columnDefinition = "smallint COMMENT '类型 -1 停用 1 启用'")
  private Short status;
  /**
   * -1 显示 1 隐藏
   */
  @Column(name = "HIDDEN", columnDefinition = "smallint COMMENT '-1显示 1 隐藏'")
  private Short hidden;
  /**
   * 页面路由
   */
  @Column(name = "PATH", columnDefinition = "varchar(100) COMMENT '菜单名称'")
  private String path;
  /**
   * 显示图标
   */
  @Column(name = "ICON", columnDefinition = "varchar(100) COMMENT '显示图标'")
  private String icon;
  /**
   * 所属终端系统:DOWNSTREAM,OPERATION,SUPPLIER,UPSTREAM
   */
  @Column(name = "TERMINAL_TYPE", columnDefinition = "varchar(50) COMMENT '所属终端'")
  private String terminalType;
  /**
   * 目录树    格式：1-11-12  1：父父类id，11：父类id，12：当前id
   */
  @Column(name = "CATALOG_CODE", columnDefinition = "varchar(50) COMMENT '目录树'")
  private String catalogCode;
  /**
   * 唯一编码
   */
  @Column(name = "CODE", columnDefinition = "varchar(50) COMMENT '唯一编码'")
  private String code;
}
